import { ref } from 'vue'
import { defineStore } from 'pinia'
import { getCategoryAPI } from '@/apis/layout';
export const usecategoryStore = defineStore('category', () => {
  //导航列表逻辑
  //state
  const categoryList = ref([]);
  //action
  const getCategory = async() =>{
  
    const res = await getCategoryAPI()
    //console.log(res);
    categoryList.value = res.result
    //console.log(categoryList);
    
    
  }
  return { categoryList, getCategory }
})
